#ifndef __RC522__H__
#define __RC522__H__

#include <MFRC522.h>

#define RST_PIN   22  //GPIO22
#define SS_PIN    21  //GPIO21 SDA
#define MISO_PIN  27  //GPIO27  spi 需要引脚
#define MOSI_PIN  26  //GPIO26
#define SCK_PIN   25  //GIPO25
#define blockAddr  4          //For example; if blockAddr is 03h then pages 03h, 04h, 05h, 06h are returned.

MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.
MFRC522::MIFARE_Key key;

void init_RC522() {

    SPI.begin(SCK_PIN, MISO_PIN, MOSI_PIN);        // Init SPI bus      
    SPI.setDataMode(SPI_MODE3);
    mfrc522.PCD_Init(); // Init MFRC522 card   

}


#endif